﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DiemChapNhanThe.Entities;
using DiemChapNhanThe.Data;

public partial class Controls_ControlTimKiemRight : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            BindCatalog.BindDiaPhuong(cboDiaPhuong);
            BindCatalog.BindLoaiMatHang(cboLoaiMatHang);
        }
    }
    protected void cmdTimKiem_Click(object sender, EventArgs e)
    {
        string tuKhoa = txtDoanhNghiep.Text == "" ? "0" : txtDoanhNghiep.Text;
        if (cboDiaPhuong != null)
        {
            Response.Redirect("~/" + Common.ConvertToUnSign(tuKhoa) + "_" + cboDiaPhuong.SelectedValue + "_" + cboLoaiMatHang.SelectedValue +
                              "_KQ.aspx");
        }
    }

    protected void cmdTimLai_Click(object sender, EventArgs e)
    {
        txtDoanhNghiep.Text = "";
        cboDiaPhuong.Text = "";
        cboLoaiMatHang.Text = "";
    }
}